<template>
  <div class="app-container">
    <el-form v-show="showSearch" ref="queryRef" :model="queryParams" :inline="true">
      <el-form-item label="会员等级" prop="status">
        <el-select
          v-model="queryParams.status"
          clearable
          style="width: 240px"
        >
          <el-option />
        </el-select>
      </el-form-item>
      <el-form-item label="订单编号" prop="name">
        <el-input
          v-model="queryParams.name"
          clearable
          style="width: 240px"
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="会员姓名" prop="name">
        <el-input
          v-model="queryParams.name"
          clearable
          style="width: 240px"
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="手机号" prop="name">
        <el-input
          v-model="queryParams.memberTelno"
          clearable
          style="width: 240px"
          @keyup.enter="handleQuery"
        />
      </el-form-item>
      <el-form-item label="支付方式" prop="name">
        <el-select><el-option>全部</el-option></el-select>
      </el-form-item>
      <el-form-item label="订单时间" prop="name">
        <el-date-picker 
          type="datetimerange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        />
      </el-form-item>
      <el-form-item label="订单来源" prop="name">
        <el-select><el-option>全部</el-option></el-select>
      </el-form-item>
      <el-form-item label="支付状态" prop="name">
        <el-select><el-option>全部</el-option></el-select>
      </el-form-item>
	  			  
      <el-form-item>
        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>  	
    <el-row :gutter="10" class="mb8">
      <el-col :span="20">
        <el-button
          v-hasPermi="['oam:venue:add']"
          type="warning"
          plain
        >导出</el-button>
      </el-col>
      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList" />
    </el-row> 
	  			  
    <!-- 表格数据 -->
    <el-table v-loading="loading" @selection-change="handleSelectionChange">
      <el-table-column type="index" />
      <el-table-column label="订单编号" prop="cardTypeStr" width="120" />
      <el-table-column label="会员姓名" prop="cardTypeStr" width="120" />
      <el-table-column label="会员卡号" prop="cardTypeStr" width="120" />
      <el-table-column label="手机号" prop="memberTelno" width="120" />
      <el-table-column label="卡片等级" prop="cardTypeStr" width="120" />
      <el-table-column label="商品详情" prop="cardTypeStr" width="120" />
      <el-table-column label="订单金额" prop="cardTypeStr" width="120" />
      <el-table-column label="优惠金额" prop="cardTypeStr" width="120" />
      <el-table-column label="折后金额" prop="cardTypeStr" width="120" />
      <el-table-column label="支付信息" prop="cardTypeStr" width="120" />
      <el-table-column label="订单来源" prop="cardTypeStr" width="120" />
      <el-table-column label="支付状态" prop="cardTypeStr" width="120" />
      <el-table-column label="操作员" prop="cardTypeStr" width="120" />
      <el-table-column label="操作" align="center" fixed="right" class-name="small-padding">
        <template #default="scope">
          <el-button type="text" @click="record(scope.row)">详情</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total > 0"
      v-model:page="queryParams.pageNum"
      v-model:limit="queryParams.pageSize"
      :total="total"
      @pagination="getList"
    />
    <!-- 详情 -->
    <el-dialog v-model="open" :title="title" width="800px" append-to-body>
      <el-descriptions :column="2">
        <el-descriptions-item label="订单编号">{{ form.memberName }}</el-descriptions-item>
        <el-descriptions-item label="会员姓名">{{ form.memberName }}</el-descriptions-item>
        <el-descriptions-item label="会员卡号">{{ form.memberName }}</el-descriptions-item>
        <el-descriptions-item label="手机号">{{ form.memberTelno }}</el-descriptions-item>
        <el-descriptions-item label="卡片等级">{{ form.memberName }}</el-descriptions-item>
        <el-descriptions-item label="商品详情">{{ form.memberName }}</el-descriptions-item>
        <el-descriptions-item label="订单金额">{{ form.memberName }}</el-descriptions-item>
        <el-descriptions-item label="优惠金额">{{ form.memberName }}</el-descriptions-item>
        <el-descriptions-item label="折后金额">{{ form.memberName }}</el-descriptions-item>
        <el-descriptions-item label="支付信息">{{ form.memberName }}</el-descriptions-item>
        <el-descriptions-item label="订单来源">{{ form.memberName }}</el-descriptions-item>
        <el-descriptions-item label="支付状态">{{ form.memberName }}</el-descriptions-item>
        <el-descriptions-item label="操作员">{{ form.memberName }}</el-descriptions-item>

      </el-descriptions>
    </el-dialog>
  </div>
</template>

<script setup name="ven_order_venue">
const { proxy } = getCurrentInstance()	
	
const showSearch = ref(true)
const ids = ref([])
const single = ref(true)
const multiple = ref(true)
const total = ref(0)
const title = ref('')
const open = ref(false)
const loading = ref(true)
const data = reactive({
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    name: undefined
  },
  rules: {
		
  }
})
const { queryParams, form, rules } = toRefs(data)
// 获取列表
function getList() {
  loading.value = true
}

function reset() {
  form.value = {}
  proxy.resetForm('roleRef')
}
/** 搜索按钮操作 */
function handleQuery() {
  queryParams.value.pageNum = 1
  getList()
}
/** 重置按钮操作 */
function resetQuery() {
  proxy.resetForm('queryRef')
  handleQuery()
}


getList()
</script>

<style scoped>
	
</style>
